package com.example.financeapi.config.constant;

/**
 * 公共常量类
 * @author Alvin
 */
public class APIConstant {

    /**有效时间2小时*/
    public static final long TOKEN_TIMES = 2 * 60 * 60;
    /**有效时间7天 =168小时*/
    public static final long JWT_TOKEN_TIMES = 7 * 12 * 2 * 60 * 60 * 1000;
    /**有效时间12小时*/
    public static final int COOKIE_TOKEN_TIMES =  12 * 60 * 60 * 1000;
    public static final String COOKIE_TOKEN_PREFIX  = "token";

    /**JWT SERCERT*/
    public static final String JWT_SERCERT = "V9kjwshBgzTXOUWxyC4KlbSJqr1vQDi56pfnAoeY73Eatc02Z8LFNPdIHuGMRmXD";
    /**获取新债申购信息接口*/
    public static final String GET_NEWDEBT_URL="https://store.gf.com.cn/mobileipo/rest/bond/list";
    /**GET 微信公众号-获取ACCESS_TOKEN*/
    public static final String MX_ACCESS_TOKEN_URL="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";
    /**GET 微信小程序-获取ACCESS_TOKEN 带code*/
    public static final String MINIAPP_ACCESS_TOKEN_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
    /**GET 微信小程序-获取小程序码*/
    public static final String MINIAPP_GETWXCODE_URL="https://api.weixin.qq.com/wxa/getwxacode?access_token=%s";
    public static final String MINIAPP_GETWXCODE2_URL="https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=%s";
    /**发送微信模板消息*/
    public static final String SEND_WECHATMSG_URL="https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s";
    /**认证授权*/
    public static final String SEND_OAUTH2_URL="https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
    /**微信公众号-获取用户基本信息(UnionID机制)**/
    public static final String GET_MP_UNIONID_URL="https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid=%s&lang=zh_CN";
    /**微信小程序-获取用户基本信息(UnionID机制)**/
    public static final String GET_MINIAPP_UNIONID_URL="https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s";

    /** 百度地图根据地址获取经纬度 AK*/
    public static String BAIDUMAP_AK = "Sb1C7qfOTea4SbSWv26Eb6LXWHsLkxil";
    /** 百度地图根据地址获取经纬度*/
    public final static String BAIDUMAP_LNGLAT_URL = "http://api.map.baidu.com/geocoding/v3/?address=%s&output=json&ak=%s&callback=showLocation";
    /** 高德地图根据地址获取经纬度 AK*/
    public static String GAODEMAP_AK = "8d4b7da3bbad0fde2d60a3c6c9c7f509";
    /** 高德地图根据地址获取经纬度*/
    public final static String GAODEMAP_LNGLAT_URL = "http://restapi.amap.com/v3/geocode/geo?key=%s&address=%s";
    /** 高德地图查询两个地址之间的距离*/
    public final static String GAODEMAP_DISTANCE_URL = "http://restapi.amap.com/v3/distance?key=%s&origins=%s&destination=%s";
}
